package gui.factory 
{
	import com.bit101.components.Style;
	import flash.display.DisplayObject;
	import flash.display.SimpleButton;
	import flash.sampler.NewObjectSample;
	import flash.text.TextField;
	import flash.text.TextFieldAutoSize;
	import gui.buttons.BaseButton;
	import gui.buttons.LabelButton;
	import gui.buttons.RadioButton;
	import gui.NumStepper;
	import gui.PositionInfo;
	import gui.ScrollBar;
	/**
	 * ...
	 * @author Dmitriy Gaiduk
	 */
	public class StyleFactory 
	{
		public static const STYLE_RB_PROJ_PERSPETCTIVE:String = "STYLE_RADIO_BUTTON_PROJ_PERSPETCTIVE";
		public static const STYLE_RB_PROJ_UP:String = "STYLE_RADIO_BUTTON_PROJ_UP";
		public static const STYLE_RB_PROJ_LEFT:String = "STYLE_RADIO_BUTTON_PROJ_LEFT";
		public static const STYLE_RB_PROJ_RIGHT:String = "STYLE_RADIO_BUTTON_PROJ_RIGHT";
		
		public static const STYLE_RB_ROOM_SIZE:String = "STYLE_RB_ROOM_SIZE";
		public static const STYLE_RB_FURNITURE_BOTTOM:String = "STYLE_RB_FURNITURE_BOTTOM";
		public static const STYLE_RB_FURNITURE_TOP:String = "STYLE_RB_FURNITURE_TOP";
		public static const STYLE_RB_TECH:String = "STYLE_RB_FURNITURE_TECH";
		
		public static const STYLE_RB_TREE_FOLDER:String = "STYLE_RB_TREE_FOLDER";
		public static const STYLE_RB_TREE_NODE:String = "STYLE_RB_TREE_NODE";
		
		public static const BOTTOM_BAR_FACADE:String = "BOTTOM_BAR_FACADE";
		public static const BOTTOM_BAR_TABLETOP:String = "BOTTOM_BAR_TABLETOP";
		//public static const STYLE_RB_BOTTOM_TREE:String = "STYLE_RB_BOTTOM_TREE";
		
		public static const RIGHT_BAR_WIDTH:Number = 349;
		public static const HEADER_HEIGHT:Number = 50.0;
		//public static const RB_PROJECT_WIDTH:Number = 82;
		//public static const RB_PROJECT_HEIGHT:Number = 46;
		
		//public static const RB_MAIN_FOLDER_WIDTH:Number = 260;
		//public static const RB_MAIN_FOLDER_HEIGHT:Number = 37;
		
		public static const RB_TREE_FOLDER_WIDTH:Number = 96;
		public static const RB_TREE_FOLDER_HEIGHT:Number = 40;
		
		public static const RB_TREE_NODE_WIDTH:Number = 96;
		public static const RB_TREE_NODE_HEIGHT:Number = 15;
		
		public static const BTN_ADD_FURNITURE_Y:Number = 470;
		public static const RIGTH_MODULE_Y:Number = 150;
		
		public static const TEXTURES_LIST_VERTICAL_W:Number = 550; // 600
		public static const TEXTURES_LIST_VERTICAL_H:Number = 180; //180
		public static const TEXTURES_LIST_HORIZ_W:Number = 485; // 600
		public static const TEXTURES_LIST_HORIZ_H:Number = 180; //180
		
		public static const BOTTOM_MODULE_Y:Number = 650;
		public static const BOTTOM_MODULE_HEAD_HEIGHT:Number = 50;
		public static const BOTTOM_MODULE_HEIGHT:Number = 250;
		public static const BOTTOM_MODULE_WIDTH:Number = 1055;
		public static const RB_BOTTOM_MAIN_WIDTH:Number = 150;
		public static const RB_BOTTOM_MAIN_HEIGHT:Number = 37;
		public static const SCROLLBAR_BOTTOM_VERTICAL:String = "SCROLLBAR_BOTTOM_VERTICAL";
		public static const SCROLLBAR_BOTTOM_HORIZNTAL:String = "SCROLLBAR_BOTTOM_HORIZNTAL";
		
		public static const STYLE_RB_CHOOSE_ATTRIB:String = "STYLE_RB_CHOOSE_ATTRIB";
		public static const STYLE_TXT_CHOOSE_ATTRIB:String = "STYLE_TXT_CHOOSE_ATTRIB";
		public static const STYLE_TXT_CHOOSE_ATTRIB_HEADER:String = "STYLE_TXT_CHOOSE_ATTRIB_HEADER";
		public static const CHOOSE_ATTRIB_MODULE_WIDTH:Number = 185;
		public static const CHOOSE_ATTRIB_MODULE_HEIGHT:Number = 300;
		public static const CHOOSE_ATTRIB_MODULE_Y:Number = 20;
		public static const RB_ATTRIB_WIDTH:Number = 260;
		public static const RB_ATTRIB_HEIGHT:Number = 30;
		
		
		
		public static const NUM_STEP_ROOM_SIZE:String = "NUM_STEP_ROOM_SIZE";
		public static const NUM_STEP_FURNITURES_BOTTOM:String = "NUM_STEP_FURNITURES_BOTTOM";
		public static const NUM_STEP_TEXT:String = "NUM_STEP_TEXT";
		public static const NUM_STEP_TITLE:String = "NUM_STEP_TITLE";
		public static const NUM_STEP_WIDTH:Number = 166;
		public static const NUM_STEP_HEIGHT:Number = 30;
		public static const NUM_STEP_BTN_WIDTH:Number = 30;
		
		
		public static const STYLE_TXT_ROOM_SIZE_TITLE:String = "STYLE_TXT_ROOM_SIZE_TITLE";
		public static const COLOR_ROOM_SIZE_TEXT:uint = 0x333333;
		
		public static const STYLE_BUTTON_ADD:String = "STYLE_BUTTON_ADD";
		public static const STYLE_BUTTON_REMOVE:String = "STYLE_BUTTON_REMOVE";
		
		
		public static const STYLE_BUTTON_FAVORITE:String = "STYLE_BUTTON_FAVORITE";
		public static const STYLE_BUTTON_PRINT:String = "STYLE_BUTTON_PRINT";
		public static const STYLE_BUTTON_CALC:String = "STYLE_BUTTON_CALC";
		public static const STYLE_BUTTON_TUTOR:String = "STYLE_BUTTON_TUTOR";
		public static const STYLE_BUTTON_GALLERY:String = "STYLE_BUTTON_GALLERY";
		
		public static const RIGHT_COLUMN_WIDTH:Number = 234;
		public static const RIGHT_COLUMN_PADDING_TOP:Number = 20;
		
		public static const BTN_ZOOM_IN:String = "BTN_ZOOM_IN";
		public static const BTN_ZOOM_OUT:String = "BTN_ZOOM_OUT";
		public static const BTN_ZOOM_NO_ZOOM:String = "BTN_ZOOM_NO_ZOOM";
		
		// bottom buttons
		public static const CORPUS_COLOR:String = "corpusColor";
		public static const PLASTIC_TABLETOP:String = "plasticTabletop";
		public static const STONE_TABLETOP:String = "stoneTabletop";
		public static const ENAMEL_COLOR:String = "enamelColor";
		public static const LONDON_PARIS:String = "londonParis";
		public static const MDF:String = "mdf";
		public static const SOLID:String = "solid";
		
		public function StyleFactory() 
		{
			
		}
		
	
		public static function setScrollBarStyle(scrollBar:ScrollBar, styleType:String):void
		{
			switch(styleType)
			{
				case SCROLLBAR_BOTTOM_VERTICAL:
						scrollBarBottomVertical(scrollBar);
					break;
				case SCROLLBAR_BOTTOM_HORIZNTAL:
						scrollBarBottomHorizontal(scrollBar);
					break;
			}
		}
		
		static private function scrollBarBottomHorizontal(scrollBar:ScrollBar):void 
		{
			scrollBar.width = TEXTURES_LIST_VERTICAL_W;
			scrollBar.height = TEXTURES_LIST_VERTICAL_H;
			scrollBar.plusButton = new ScrollBtnRight();
			scrollBar.minusButton = new ScrollBtnLeft();
			scrollBar.type = ScrollBar.HORIZONTAL;
		}
		
		static private function scrollBarBottomVertical(scrollBar:ScrollBar):void 
		{
			/*var upBtn:BaseButton = new BaseButton();
			var upBtnSkin:DisplayObject = new ScrollUpBtnSkin();
			upBtn.width = upBtnSkin.width;
			upBtn.height = upBtnSkin.height;
			upBtn.setStyle(BaseButton.UP_SKIN, new ScrollUpBtnSkin());
			upBtn.setStyle(BaseButton.OVER_SKIN, new ScrollUpBtnSkin());
			upBtn.setStyle(BaseButton.DOWN_SKIN, new ScrollUpBtnSkin());
			
			var downBtn:BaseButton = new BaseButton();
			var downBtnSkin:DisplayObject = new ScrollDownBtnSkin();
			downBtn.width = downBtnSkin.width;
			downBtn.height = downBtnSkin.height;
			downBtn.setStyle(BaseButton.UP_SKIN, new ScrollDownBtnSkin());
			downBtn.setStyle(BaseButton.OVER_SKIN, new ScrollDownBtnSkin());
			downBtn.setStyle(BaseButton.DOWN_SKIN, new ScrollDownBtnSkin());
			
			var thumbBtn:BaseButton = new BaseButton();
			var thumbBtnSkin:DisplayObject = new ScrollThumbSkin();
			thumbBtn.width = thumbBtnSkin.width;
			thumbBtn.height = thumbBtnSkin.height;
			thumbBtn.setStyle(BaseButton.UP_SKIN, new ScrollThumbSkin());
			thumbBtn.setStyle(BaseButton.OVER_SKIN, new ScrollThumbSkin());
			thumbBtn.setStyle(BaseButton.DOWN_SKIN, new ScrollThumbSkin());
			*/
			
			scrollBar.width = 28;
			scrollBar.height = 181;
			scrollBar.scrollBar = new ScrollBack();
			scrollBar.minusButton = new ScrollUpBtn;
			scrollBar.plusButton = new ScrollDownBtn;
			scrollBar.thumb = new ScrollThumbBtn();
			scrollBar.type = ScrollBar.VERTICAL;
			
		}
		
		public static function setButtonStyle(btn:BaseButton, styleType:String):void
		{
			switch(styleType)
			{
				case STYLE_BUTTON_ADD:
						setButtonAdd(btn);
					break;
				case STYLE_BUTTON_REMOVE:
						setButtonRemove(btn);
					break;
				case STYLE_BUTTON_FAVORITE:
					setButtonFavor(btn);
				break;
				case STYLE_BUTTON_PRINT:
					setButtonPrint(btn);
				break;
				case STYLE_BUTTON_CALC:
					setButtonCalc(btn);
				break;
				case STYLE_BUTTON_TUTOR:
					setButtonTutor(btn);
				break;
				case STYLE_BUTTON_GALLERY:
					setButtonGallery(btn);
				break;
				case BTN_ZOOM_IN:
					setZoomInBtn(btn);
				break;
				case BTN_ZOOM_OUT:
					setZoomOutBtn(btn);
				break;
				case BTN_ZOOM_NO_ZOOM:
					setZoomNoZoomBtn(btn);
				break;
			}
		}
		
		static private function setZoomNoZoomBtn(btn:BaseButton):void 
		{
			var buttonUp:SimpleButton = new NoZoomBtn();
			btn.buttonUp = buttonUp;
			btn.width = buttonUp.width;
			btn.height = buttonUp.height;
		}
		
		static private function setZoomOutBtn(btn:BaseButton):void 
		{
			var buttonUp:SimpleButton = new ZoomOutBtn();
			btn.buttonUp = buttonUp;
			btn.width = buttonUp.width;
			btn.height = buttonUp.height;
		}
		
		static private function setZoomInBtn(btn:BaseButton):void 
		{
			var buttonUp:SimpleButton = new ZoomInBtn();
			btn.buttonUp = buttonUp;
			btn.width = buttonUp.width;
			btn.height = buttonUp.height;
		}
		
		static private function setButtonGallery(btn:BaseButton):void 
		{
			var buttonUp:SimpleButton = new GalleryUp();
			btn.buttonUp = buttonUp;
			btn.width = buttonUp.width;
			btn.height = buttonUp.height;
		}
		
		static private function setButtonTutor(btn:BaseButton):void 
		{
			var buttonUp:SimpleButton = new TutorialUp();
			btn.buttonUp = buttonUp;
			btn.width = buttonUp.width;
			btn.height = buttonUp.height;
		}
		
		static private function setButtonCalc(btn:BaseButton):void 
		{
			//var btnSkin:DisplayObject = new BtnCalculateSkin();
			//btn.setStyle(BaseButton.UP_SKIN, new BtnCalculateSkin());
			//btn.setStyle(BaseButton.OVER_SKIN, new BtnCalculateSkin());
			//btn.setStyle(BaseButton.DOWN_SKIN, new BtnCalculateSkin());
			var buttonUp:SimpleButton = new CalculateUp();
			btn.buttonUp = buttonUp;
			btn.width = buttonUp.width;
			btn.height = buttonUp.height;
		}
		
		static private function setButtonPrint(btn:BaseButton):void 
		{
			var buttonUp:SimpleButton = new PrintUp();
			btn.buttonUp = buttonUp;
			btn.width = buttonUp.width;
			btn.height = buttonUp.height;
		}
		
		static private function setButtonFavor(btn:BaseButton):void 
		{
			var buttonUp:SimpleButton = new FavoriteUp();
			btn.buttonUp = buttonUp;
			btn.width = buttonUp.width;
			btn.height = buttonUp.height;
		}
		
		static private function setButtonAdd(btn:BaseButton):void 
		{
			/*var btnSkin:DisplayObject = new BtnAddSkin();
			btn.setStyle(BaseButton.UP_SKIN, new BtnAddSkin());
			btn.setStyle(BaseButton.OVER_SKIN, new BtnAddSkin());
			btn.setStyle(BaseButton.DOWN_SKIN, new BtnAddSkin());
			btn.width = btnSkin.width;
			btn.height = btnSkin.height;
			var labelButton:LabelButton = btn as LabelButton;
			if (labelButton != null)
			{
				labelButton.textPosition.align = PositionInfo.ALIGN_CENTR_X;
				labelButton.textPosition.addAlign(PositionInfo.ALIGN_CENTR_Y);
				labelButton.textField.textColor = 0xFFFFFF;
			}*/
			btn.buttonUp = new AddFurnitureUp();;
			btn.width = btn.buttonUp.width;
			btn.height = btn.buttonUp.height;
		}
		
		static private function setButtonRemove(btn:BaseButton):void 
		{
			btn.buttonUp = new RemoveFurnitureUp();;
			btn.width = btn.buttonUp.width;
			btn.height = btn.buttonUp.height;
			/*
			var btnSkin:DisplayObject = new BtnRemoveSkin();
			btn.setStyle(BaseButton.UP_SKIN, new BtnRemoveSkin());
			btn.setStyle(BaseButton.OVER_SKIN, new BtnRemoveSkin());
			btn.setStyle(BaseButton.DOWN_SKIN, new BtnRemoveSkin());
			btn.width = btnSkin.width;
			btn.height = btnSkin.height;
			var labelButton:LabelButton = btn as LabelButton;
			if (labelButton != null)
			{
				labelButton.textPosition.align = PositionInfo.ALIGN_CENTR_X;
				labelButton.textPosition.addAlign(PositionInfo.ALIGN_CENTR_Y);
				labelButton.textField.textColor = 0xFFFFFF;
			}*/
		}
		
		
		
		
		public static function setTextStyle(text:TextField, styleType:String):void
		{
			switch(styleType)
			{
				case STYLE_TXT_CHOOSE_ATTRIB:
						setTextChooseAttrib(text);
					break;
				case STYLE_TXT_CHOOSE_ATTRIB_HEADER:
						setTextChooseAttribHeader(text);
					break;
				case NUM_STEP_TEXT:
						setNumStepText(text);
					break;
				case NUM_STEP_TITLE:
						setNumStepTitle(text);
					break;
				case STYLE_TXT_ROOM_SIZE_TITLE:
						setRoomSizeTitle(text);
					break;
			}
		}
		
		static private function setRoomSizeTitle(text:TextField):void 
		{
			text.width = 1;
			text.autoSize = TextFieldAutoSize.RIGHT;
			text.mouseEnabled = false;
			text.selectable = false;
			text.textColor = COLOR_ROOM_SIZE_TEXT;
		}
		
		public static function setNumStepStyle(numStep:NumStepper,  styleType:String):void
		{
			switch(styleType)
			{
				case NUM_STEP_ROOM_SIZE:
						setNumStepRoomSize(numStep);
					break;
				case NUM_STEP_FURNITURES_BOTTOM:
						setNumStepFurnBottom(numStep);
					break;
			}
		}
		
		static private function setNumStepFurnBottom(numStep:NumStepper):void 
		{
			numStep.width = NUM_STEP_WIDTH;
			numStep.height = NUM_STEP_HEIGHT;
			numStep.upButton = new NumStepPlusBtn();
			numStep.downButton = new NumStepMinusBtn();
			
			setNumStepTitle(numStep.titleTF, COLOR_ROOM_SIZE_TEXT);
			setNumStepText(numStep.textFieldNum);
			numStep.addTextBG(new NumStepTextBg());
			
			numStep.titlePos.align = PositionInfo.ALIGN_TOP;
			numStep.titlePos.addAlign(PositionInfo.ALIGN_LEFT);
			numStep.titlePos.leftPadding = 15;
			
			numStep.invalidateNow();
		}
		
		static private function setNumStepRoomSize(numStep:NumStepper):void 
		{
				
			numStep.width = NUM_STEP_WIDTH;
			numStep.height = NUM_STEP_HEIGHT;
			numStep.upButton = new NumStepPlusBtn();
			numStep.downButton = new NumStepMinusBtn();
			
			setNumStepTitle(numStep.titleTF, COLOR_ROOM_SIZE_TEXT);
			setNumStepText(numStep.textFieldNum);
			numStep.addTextBG(new NumStepTextBg());
			numStep.titlePos.align = PositionInfo.ALIGN_TOP;
			numStep.titlePos.addAlign(PositionInfo.ALIGN_LEFT);
			numStep.titlePos.leftPadding = 15;
			
			numStep.invalidateNow();
		}
		
		
		
		static private function setNumStepTitle(text:TextField, textColor:uint = 0xFFFFFF):void 
		{
			text.width = 1;
			text.autoSize = TextFieldAutoSize.RIGHT;
			text.mouseEnabled = false;
			text.selectable = false;
			text.textColor = textColor;
		}
		
		static private function setNumStepText(text:TextField):void 
		{
			text.width = 1;
			text.autoSize = TextFieldAutoSize.RIGHT;
			text.mouseEnabled = false;
			text.selectable = false;
			text.textColor = 0xFFFFFF;
		}
		
		static private function setTextChooseAttribHeader(text:TextField):void 
		{
			text.width = 1;
			text.autoSize = TextFieldAutoSize.RIGHT;
			text.mouseEnabled = false;
			text.selectable = false;
		}
		
		static private function setTextChooseAttrib(text:TextField):void 
		{
			text.width = 1;
			text.autoSize = TextFieldAutoSize.RIGHT;
			text.mouseEnabled = false;
			text.selectable = false;
		}
		
		public static function setRadioButtonStyle(radBtn:RadioButton, styleType:String):void
		{
			switch(styleType)
			{
				case STYLE_RB_PROJ_PERSPETCTIVE:
						setRadButtonProjPerspect(radBtn);
					break;
				case STYLE_RB_PROJ_UP:
						setRadButtonProjUp(radBtn);
					break;
				case STYLE_RB_PROJ_LEFT:
						setRadButtonProjLeft(radBtn);
					break;
				case STYLE_RB_PROJ_RIGHT:
						setRadButtonProjRight(radBtn);
					break;
				case STYLE_RB_ROOM_SIZE:
						setRadButtonRoomSize(radBtn);
					break;
				case STYLE_RB_FURNITURE_BOTTOM:
						setRadButtonFurnBottom(radBtn);
					break;
				case STYLE_RB_FURNITURE_TOP:
						setRadButtonFurnUp(radBtn);
					break;
				case STYLE_RB_TECH:
						setRadButtonFurnTech(radBtn);
					break;
				case STYLE_RB_TREE_FOLDER:
						setRBTreeFolder(radBtn);
					break;
				case STYLE_RB_TREE_NODE:
						setRBTreeNode(radBtn);
					break;
				case BOTTOM_BAR_FACADE:
						bottomBarFacade(radBtn);
					break;
				case BOTTOM_BAR_TABLETOP:
						bottomBarTabletop(radBtn);
					break;
				
				case STYLE_RB_CHOOSE_ATTRIB:
						setRBChooseAttrib(radBtn);
					break;
				case PLASTIC_TABLETOP:
						setBottomPlasticTabletop(radBtn);
					break;
				case STONE_TABLETOP:
						setBottomStoneTabletop(radBtn);
					break;
				case ENAMEL_COLOR:
						setBottomEnamelColor(radBtn);
					break;
				case LONDON_PARIS:
						setBottomLondonParis(radBtn);
					break;
				case MDF:
						setBottomMdf(radBtn);
					break;
				case SOLID:
						setBottomSolid(radBtn);
					break;	
				case CORPUS_COLOR:
						setCorpusColor(radBtn);
					break;
			}
		}
		
		static private function setCorpusColor(radBtn:RadioButton):void 
		{
			radBtn.buttonUp = new CorpusColorUp();
			radBtn.buttonSelected = new CorpusColorSelected();
			radBtn.width = radBtn.buttonUp.width;
			radBtn.height = radBtn.buttonUp.height;
		}
		
		static private function setBottomEnamelColor(radBtn:RadioButton):void 
		{
			radBtn.buttonUp = new EnamelColorUp();
			radBtn.buttonSelected = new EnamelColorSelected();
			radBtn.width = radBtn.buttonUp.width;
			radBtn.height = radBtn.buttonUp.height;
		}
		
		static private function setBottomLondonParis(radBtn:RadioButton):void 
		{
			radBtn.buttonUp = new LondonParisUp();
			radBtn.buttonSelected = new LondonParisSelected();
			radBtn.width = radBtn.buttonUp.width;
			radBtn.height = radBtn.buttonUp.height;
		}
		
		static private function setBottomMdf(radBtn:RadioButton):void 
		{
			radBtn.buttonUp = new MdfUp();
			radBtn.buttonSelected = new MdfSelected();
			radBtn.width = radBtn.buttonUp.width;
			radBtn.height = radBtn.buttonUp.height;
		}
		
		static private function setBottomSolid(radBtn:RadioButton):void 
		{
			radBtn.buttonUp = new SolidUp();
			radBtn.buttonSelected = new SolidSelected();
			radBtn.width = radBtn.buttonUp.width;
			radBtn.height = radBtn.buttonUp.height;
		}
		
		static private function setBottomStoneTabletop(radBtn:RadioButton):void 
		{
			radBtn.buttonUp = new StoneTabletopUp();
			radBtn.buttonSelected = new StoneTabletopSelect();
			radBtn.width = radBtn.buttonUp.width;
			radBtn.height = radBtn.buttonUp.height;
		}
		
		static private function setBottomPlasticTabletop(radBtn:RadioButton):void 
		{
			radBtn.buttonUp = new PlasticTabletopUp();
			radBtn.buttonSelected = new PlasticTabletopSelect();
			radBtn.width = radBtn.buttonUp.width;
			radBtn.height = radBtn.buttonUp.height;
		}
		
		static private function setRBChooseAttrib(radBtn:RadioButton):void 
		{
			radBtn.width = RB_ATTRIB_WIDTH;
			radBtn.height = RB_ATTRIB_HEIGHT;
			
			radBtn.setStyle(RadioButton.UP_ICON, new RadBtnIconUp());
			radBtn.setStyle(RadioButton.OVER_ICON, new RadBtnIconUp());
			radBtn.setStyle(RadioButton.DOWN_ICON, new RadBtnIconUp());
			
			radBtn.setStyle(RadioButton.SELECTED_UP_ICON, new RadBtnIconSelected());
			radBtn.setStyle(RadioButton.SELECTED_OVER_ICON, new RadBtnIconSelected());
			radBtn.setStyle(RadioButton.SELECTED_DOWN_ICON, new RadBtnIconSelected());
			radBtn.textPosition.align = PositionInfo.ALIGN_NONE;
			//radBtn.textPosition.addAlign(PositionInfo.ALIGN_LEFT);
			
			radBtn.textPosition.posX = 30;
			radBtn.textPosition.posY = 1;
			radBtn.textPosition
			radBtn.textField.width = CHOOSE_ATTRIB_MODULE_WIDTH;
			radBtn.textField.wordWrap = true;
			radBtn.textField.mouseEnabled = false;
			radBtn.textField.selectable = false;
			
		}
		
		/*static private function setRBBottomTree(radBtn:RadioButton):void 
		{
			radBtn.width = RB_BOTTOM_MAIN_WIDTH;
			radBtn.height = RB_BOTTOM_MAIN_HEIGHT;
			
			radBtn.setStyle(BaseButton.SELECTED_UP_SKIN, new RBBottomTreeSkin_UP());
			radBtn.setStyle(BaseButton.SELECTED_OVER_SKIN, new RBBottomTreeSkin_UP());
			radBtn.setStyle(BaseButton.SELECTED_DOWN_SKIN, new RBBottomTreeSkin_UP());
			
			radBtn.setStyle(BaseButton.UP_SKIN, new RBBottomTreeSkin_UP());
			radBtn.setStyle(BaseButton.OVER_SKIN, new RBBottomTreeSkin_UP());
			radBtn.setStyle(BaseButton.DOWN_SKIN, new RBBottomTreeSkin_UP());
			
			
			radBtn.setStyle(RadioButton.UP_ICON, new RBBottomTreeIcon_UP());
			radBtn.setStyle(RadioButton.OVER_ICON, new RBBottomTreeIcon_UP());
			radBtn.setStyle(RadioButton.DOWN_ICON, new RBBottomTreeIcon_UP());
			
			radBtn.setStyle(RadioButton.SELECTED_UP_ICON, new RBBottomTreeIconSeelected_UP());
			radBtn.setStyle(RadioButton.SELECTED_OVER_ICON, new RBBottomTreeIconSeelected_UP());
			radBtn.setStyle(RadioButton.SELECTED_DOWN_ICON, new RBBottomTreeIconSeelected_UP());
			
			
			radBtn.textPosition.align = PositionInfo.ALIGN_CENTR_Y;
			radBtn.textPosition.posX = 26;
				
			radBtn.iconPosition.align = PositionInfo.ALIGN_LEFT;
			radBtn.iconPosition.addAlign(PositionInfo.ALIGN_CENTR_Y);
			radBtn.iconPosition.leftPadding = 5;
			
			radBtn.textField.textColor = 0xFFFFFF;
			radBtn.textField.wordWrap = true;
			radBtn.textField.width = 95;
			radBtn.textField.height = 50;
			radBtn.textField.autoSize = TextFieldAutoSize.RIGHT;
			radBtn.textField.border = false;
		}*/
		
		static private function bottomBarFacade(radBtn:RadioButton):void 
		{
			radBtn.buttonUp = new FacadeUp();
			radBtn.buttonSelected = new FacadeSelected();
			radBtn.width = radBtn.buttonUp.width;
			radBtn.height = radBtn.buttonUp.height;
		}
		
		static private function bottomBarTabletop(radBtn:RadioButton):void 
		{
			radBtn.buttonUp = new TabletopUp();
			radBtn.buttonSelected = new TabletopSelected();
			radBtn.width = radBtn.buttonUp.width;
			radBtn.height = radBtn.buttonUp.height;
		}
		
		private static function setRadButtonProjPerspect(radBtn:RadioButton):void
		{
			//radBtn.width = RB_PROJECT_WIDTH;
			//radBtn.height = RB_PROJECT_HEIGHT;
			radBtn.buttonUp = new ProjPerspectiveUp();
			radBtn.buttonSelected = new ProjPerspectiveSelect();
			radBtn.width = radBtn.buttonUp.width;
			radBtn.height = radBtn.buttonUp.height;
		}
		private static function setRadButtonProjUp(radBtn:RadioButton):void
		{
			radBtn.buttonUp = new ProjUpUp();
			radBtn.buttonSelected = new ProjUpSelect();
			radBtn.width = radBtn.buttonUp.width;
			radBtn.height = radBtn.buttonUp.height;
		}
		private static function setRadButtonProjLeft(radBtn:RadioButton):void
		{
			radBtn.buttonUp = new ProjLeftUP();
			radBtn.buttonSelected = new ProjLeftSelect();
			radBtn.width = radBtn.buttonUp.width;
			radBtn.height = radBtn.buttonUp.height;
		}
		private static function setRadButtonProjRight(radBtn:RadioButton):void
		{
			radBtn.buttonUp = new ProjRightUp();
			radBtn.buttonSelected = new ProjRightSelect();
			radBtn.width = radBtn.buttonUp.width;
			radBtn.height = radBtn.buttonUp.height;
		}
		
		/*private static function setRadButtonProj(radBtn:RadioButton):void
		{
			radBtn.width = RB_PROJECT_WIDTH;
			radBtn.height = RB_PROJECT_HEIGHT;
			
			radBtn.setStyle(BaseButton.SELECTED_UP_SKIN, new RadBtnSelectedSkin_UP());
			radBtn.setStyle(BaseButton.SELECTED_OVER_SKIN, new RadBtnSelectedSkin_UP());
			radBtn.setStyle(BaseButton.SELECTED_DOWN_SKIN, new RadBtnSelectedSkin_UP());
			
			radBtn.setStyle(BaseButton.UP_SKIN, new RadBtnSkin_UP());
			radBtn.setStyle(BaseButton.OVER_SKIN, new RadBtnSkin_UP());
			radBtn.setStyle(BaseButton.DOWN_SKIN, new RadBtnSkin_UP());
			
			
			radBtn.setStyle(RadioButton.UP_ICON, new RadBtnIcon_UP());
			radBtn.setStyle(RadioButton.OVER_ICON, new RadBtnIcon_UP());
			radBtn.setStyle(RadioButton.DOWN_ICON, new RadBtnIcon_UP());
			
			radBtn.setStyle(RadioButton.SELECTED_UP_ICON, new RadBtnSelectedIcon_UP());
			radBtn.setStyle(RadioButton.SELECTED_OVER_ICON, new RadBtnSelectedIcon_UP());
			radBtn.setStyle(RadioButton.SELECTED_DOWN_ICON, new RadBtnSelectedIcon_UP());
			
			
			radBtn.textPosition.align = PositionInfo.ALIGN_CENTR_X;
			radBtn.textPosition.addAlign(PositionInfo.ALIGN_TOP);
			radBtn.textPosition.leftPadding = 1;
			radBtn.textPosition.topPadding = 1;
			radBtn.textPosition.posY = 5;
			radBtn.textPosition.posX = 5;
				
			radBtn.iconPosition.align = PositionInfo.ALIGN_RIGHT;
			radBtn.iconPosition.addAlign(PositionInfo.ALIGN_BOTTOM);
			radBtn.iconPosition.rightPadding = 5;
			radBtn.iconPosition.bottomPadding = 5;
			
			radBtn.textField.textColor = 0x378ECB;
		}*/
		
		private static function setRBTreeFolder(radBtn:RadioButton):void
		{
			radBtn.width = RB_TREE_FOLDER_WIDTH;
			radBtn.height = RB_TREE_FOLDER_HEIGHT;
			
			/*radBtn.setStyle(BaseButton.SELECTED_UP_SKIN, new RadBtnSelectedSkin_UP());
			radBtn.setStyle(BaseButton.SELECTED_OVER_SKIN, new RadBtnSelectedSkin_UP());
			radBtn.setStyle(BaseButton.SELECTED_DOWN_SKIN, new RadBtnSelectedSkin_UP());
			
			radBtn.setStyle(BaseButton.UP_SKIN, new RadBtnSkin_UP());
			radBtn.setStyle(BaseButton.OVER_SKIN, new RadBtnSkin_UP());
			radBtn.setStyle(BaseButton.DOWN_SKIN, new RadBtnSkin_UP());*/
			
			
			radBtn.setStyle(RadioButton.UP_ICON, new RBTeeFolderIcon_UP());
			radBtn.setStyle(RadioButton.OVER_ICON, new RBTeeFolderIcon_Over());
			radBtn.setStyle(RadioButton.DOWN_ICON, new RBTeeFolderIcon_Down());
			
			radBtn.setStyle(RadioButton.SELECTED_UP_ICON, new RBTeeFolderSelectIcon_UP());
			radBtn.setStyle(RadioButton.SELECTED_OVER_ICON, new RBTeeFolderSelectIcon_UP());
			radBtn.setStyle(RadioButton.SELECTED_DOWN_ICON, new RBTeeFolderSelectIcon_UP());
			
			radBtn.setStyle(RadioButton.SELECTED_DELIMITER, new FolderDelimiterSelceted());
			
			radBtn.textPosition.align = PositionInfo.ALIGN_CENTR_X;
			//radBtn.textPosition.addAlign(PositionInfo.ALIGN_BOTTOM);
			radBtn.textPosition.leftPadding = 1;
			radBtn.textPosition.bottomPadding = 2;
			radBtn.textPosition.posY = 21;
			radBtn.textPosition.posX = 5;
			radBtn.textField.textColor = 0xFFFFFF;
						
			radBtn.iconPosition.align = PositionInfo.ALIGN_CENTR_X;
			//radBtn.iconPosition.addAlign(PositionInfo.ALIGN_BOTTOM);
			radBtn.iconPosition.posX = 10;
			radBtn.iconPosition.posY = 1;
			
			
			radBtn.textField.wordWrap = true;
			radBtn.textField.width = 80;
			radBtn.textField.height = 50;
			radBtn.textField.autoSize = TextFieldAutoSize.RIGHT;
			radBtn.textField.border = false;
			radBtn.textField.textColor = 0xFFFFFF;
		}
		
		private static function setRBTreeNode(radBtn:RadioButton):void
		{
			radBtn.width = RB_TREE_NODE_WIDTH;
			radBtn.height = RB_TREE_NODE_HEIGHT;
			
			/*radBtn.setStyle(BaseButton.SELECTED_UP_SKIN, new RadBtnSelectedSkin_UP());
			radBtn.setStyle(BaseButton.SELECTED_OVER_SKIN, new RadBtnSelectedSkin_UP());
			radBtn.setStyle(BaseButton.SELECTED_DOWN_SKIN, new RadBtnSelectedSkin_UP());
			
			radBtn.setStyle(BaseButton.UP_SKIN, new RadBtnSkin_UP());
			radBtn.setStyle(BaseButton.OVER_SKIN, new RadBtnSkin_UP());
			radBtn.setStyle(BaseButton.DOWN_SKIN, new RadBtnSkin_UP());*/
			
			
			radBtn.setStyle(RadioButton.UP_ICON, new RBTreeNodeIcon_UP());
			radBtn.setStyle(RadioButton.OVER_ICON, new RBTreeNodeIcon_UP());
			radBtn.setStyle(RadioButton.DOWN_ICON, new RBTreeNodeIcon_UP());
			
			radBtn.setStyle(RadioButton.SELECTED_UP_ICON, new RBTreeNodeSelectIcon_UP());
			radBtn.setStyle(RadioButton.SELECTED_OVER_ICON, new RBTreeNodeSelectIcon_UP());
			radBtn.setStyle(RadioButton.SELECTED_DOWN_ICON, new RBTreeNodeSelectIcon_UP());
			
			radBtn.setStyle(RadioButton.SELECTED_DELIMITER, new NodeDelimiterSelceted());
			radBtn.textPosition.align = PositionInfo.ALIGN_NONE;
			//radBtn.textPosition.addAlign(PositionInfo.ALIGN_TOP);
			radBtn.textPosition.leftPadding = 1;
			radBtn.textPosition.topPadding = 1;
			radBtn.textPosition.posY = 0;
			radBtn.textPosition.posX = 20;
				
			radBtn.iconPosition.align = PositionInfo.ALIGN_LEFT;
			radBtn.iconPosition.addAlign(PositionInfo.ALIGN_CENTR_Y);
			radBtn.iconPosition.leftPadding = 5;
			radBtn.iconPosition.bottomPadding = 5;
			
			radBtn.textField.wordWrap = true;
			radBtn.textField.width = 80;
			radBtn.textField.height = 50;
			radBtn.textField.autoSize = TextFieldAutoSize.RIGHT;
			radBtn.textField.border = false;
			radBtn.textField.textColor = 0xFFFFFF;
		}
		
		
		private static function setRadButtonRoomSize(radBtn:RadioButton):void
		{
			//radBtn.width = RB_MAIN_FOLDER_WIDTH;
			//radBtn.height = RB_MAIN_FOLDER_HEIGHT;
			radBtn.buttonUp = new RoomSizeUp();
			radBtn.buttonSelected = new RoomSizeSelected();
			radBtn.width = radBtn.buttonUp.width;
			radBtn.height = radBtn.buttonUp.height;
			
			/*radBtn.setStyle(BaseButton.SELECTED_UP_SKIN, new RBRoomSizeSkin_UP());
			radBtn.setStyle(BaseButton.SELECTED_OVER_SKIN, new RBRoomSizeSkin_UP());
			radBtn.setStyle(BaseButton.SELECTED_DOWN_SKIN, new RBRoomSizeSkin_UP());
			
			radBtn.setStyle(BaseButton.UP_SKIN, new RBRoomSizeSkin_UP());
			radBtn.setStyle(BaseButton.OVER_SKIN, new RBRoomSizeSkin_UP());
			radBtn.setStyle(BaseButton.DOWN_SKIN, new RBRoomSizeSkin_UP());
			
			setMainFolderIcon(radBtn);*/
		}
		
		private static function setRadButtonFurnUp(radBtn:RadioButton):void
		{
			radBtn.buttonUp = new FurnitureUpUp();
			radBtn.buttonSelected = new FurnitureUpSelected();
			radBtn.width = radBtn.buttonUp.width;
			radBtn.height = radBtn.buttonUp.height;
			/*radBtn.setStyle(BaseButton.SELECTED_UP_SKIN, new RBFurnitureUpSkin_UP());
			radBtn.setStyle(BaseButton.SELECTED_OVER_SKIN, new RBFurnitureUpSkin_UP());
			radBtn.setStyle(BaseButton.SELECTED_DOWN_SKIN, new RBFurnitureUpSkin_UP());
			
			radBtn.setStyle(BaseButton.UP_SKIN, new RBFurnitureUpSkin_UP());
			radBtn.setStyle(BaseButton.OVER_SKIN, new RBFurnitureUpSkin_UP());
			radBtn.setStyle(BaseButton.DOWN_SKIN, new RBFurnitureUpSkin_UP());
			
			setMainFolderIcon(radBtn);*/
		}
		
		private static function setRadButtonFurnBottom(radBtn:RadioButton):void
		{
			radBtn.buttonUp = new FurnitureBottomUp();
			radBtn.buttonSelected = new FurnitureBottomSelected();
			radBtn.width = radBtn.buttonUp.width;
			radBtn.height = radBtn.buttonUp.height;
			/*radBtn.setStyle(BaseButton.SELECTED_UP_SKIN, new RBFurnitureBottomSkin_UP());
			radBtn.setStyle(BaseButton.SELECTED_OVER_SKIN, new RBFurnitureBottomSkin_UP());
			radBtn.setStyle(BaseButton.SELECTED_DOWN_SKIN, new RBFurnitureBottomSkin_UP());
			
			radBtn.setStyle(BaseButton.UP_SKIN, new RBFurnitureBottomSkin_UP());
			radBtn.setStyle(BaseButton.OVER_SKIN, new RBFurnitureBottomSkin_UP());
			radBtn.setStyle(BaseButton.DOWN_SKIN, new RBFurnitureBottomSkin_UP());
			
			setMainFolderIcon(radBtn);*/
		}
		
		private static function setRadButtonFurnTech(radBtn:RadioButton):void
		{
			radBtn.buttonUp = new TechUp();
			radBtn.buttonSelected = new TechSelected();
			radBtn.width = radBtn.buttonUp.width;
			radBtn.height = radBtn.buttonUp.height;
			
			/*radBtn.setStyle(BaseButton.SELECTED_UP_SKIN, new RBTechSkin_UP());
			radBtn.setStyle(BaseButton.SELECTED_OVER_SKIN, new RBTechSkin_UP());
			radBtn.setStyle(BaseButton.SELECTED_DOWN_SKIN, new RBTechSkin_UP());
			
			radBtn.setStyle(BaseButton.UP_SKIN, new RBTechSkin_UP());
			radBtn.setStyle(BaseButton.OVER_SKIN, new RBTechSkin_UP());
			radBtn.setStyle(BaseButton.DOWN_SKIN, new RBTechSkin_UP());
			
			setMainFolderIcon(radBtn);*/
		}
		
	}

}